﻿<!DOCTYPE html>
<html>

<head>
  <meta charset=utf-8>
	<title>Embedding</title>
	<link href="base.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <div class="main">
		<h1>Embedding</h1>
		
		<h2>Overview</h2>
We explain how to emnbed Effekseer's runtime into another program.

		<h3>Windows</h3>
		<p>
On the official website, we have released a compiled runtime with multithread setting. 
If you want runtime with other settings you need to compile yourself.
Compiler only supports VisualStudio 2010 and later.			
		</p>

		<h4>In the case of DirectX9</h4>
		<p>
Please reset "Runtime/EffekseerRendererDX9.sln" according to the setting of the installation setting (multithread DLL etc.) and compile it.
Currently DirectX SDK is essential. The project exists only for Visual C ++ 2013.
When the compilation is successful, an include file is generated in "Runtime/include" and a library file is generated in "Runtime/lib".
		</p>

		<h4>In the case of DirectX11</h4>
		<p>
Please reset "Runtime/EffekseerRendererDX11.sln" according to the setting of the installation setting (multithread DLL etc.) and compile it.
Currently DirectX SDK is essential. The project exists only for Visual C ++ 2013.
When the compilation is successful, an include file is generated in "Runtime/include" and a library file is generated in "Runtime/lib".		</p>

		<h4>In the case of OpenGL</h4>
		<p>
Please reset "Runtime/EffekseerRendererGL.sln" according to the setting of the installation setting (multithread DLL etc.) and compile it.
The project exists only for Visual C ++ 2013.
When the compilation is successful, an include file is generated in "Runtime/include" and a library file is generated in "Runtime/lib".
		</p>

	  	<h3>In the case of others</h3>
		<p>
Common code exists in "Runtime/Effekseer" "Runtime/EffekseerRendererCommon".
OpenGL code exists in "EffekseerRendererGL".
Please prepare yourself and compile it according to your own environment.
		</p>

		<h2>Macro</h2>
<table>
<tr>
	<td>__EFFEKSEER_RENDERER_GL_GLEW__</td>
	<td>Use glew's DLL version (except for Windows)</td>
</tr>
<tr>
	<td>__EFFEKSEER_RENDERER_GL_GLEW_S__</td>
	<td>Use glew's static version (except for Windows)</td>
</tr>
<tr>
	<td>__EFFEKSEER_RENDERER_GLES2__</td>
	<td>Use OpenGL ES2.0</td>
</tr>
<tr>
	<td>__EFFEKSEER_RENDERER_INTERNAL_LOADER__</td>
	<td>Use loaders defined in internal</td>
</tr>
</table>
	  
		<h2>Project settings</h2>

		<h3>In the case of VisualC++</h3>
A directory which contains " Effekseer.h "," EffekseerRendererDX9.h "," EffekseerRendererGL.h " etc is 
specified as additional include directories. For DirectX 9 environment, 
include "Effekseer.h" "EffekseerRendererDX 9.h". 
For OpenGL environment, include "Effekseer.h" "EffekseerRendererGL.h". Also add the library to the reference.

		<h3>In the case of others</h3>
Please prepare your own settings according to your own environment.
	  
		<h2>Sample</h2>

		<ul class="menu">
			<li><a href="en/execution.html">Basic</a></li>
			<li><a href="en/loader.html">Setting the custom loader</a></li>
			<li><a href="en/multithread.html">Multithreading</a></li>
			<li><a href="en/network.html">Network</a></li>
			<li><a href="en/culling.html">Culling</a></li>

			<li><a href="html/doxygen/index.html" target="_top">Function reference(Translating)</a></li>
		</ul>


		<h2>FAQ</h2>
		
		<h3>I want to use Effekseer with left handed coordinate system.</h3>
		<p>
Please refer to "Basic" in this help.
		</p>

		<h3>I want to change the effect playback speed for each effect.</h3>
		<p>
Please use the "Effekseer::Manager::SetSpeed"
		</p>

		<h3>How can I extend the texture loading method?</h3>
		<p>
Please refer to "Setting the custom loader" in this help.
		</p>

		<h3>I want to draw the effects individually in an arbitrary order.</h3>
		<p>
Please execute "Effekseer::Manager::DrawHandle" instead of "Effekseer::Manager::Draw".
To draw other libraries in the middle, execute "EffekseerRenderer::Renderer::ResetRenderState" before executing "DrawHandle" after the drawing is done.
		</p>
		
		<h3>Z buffer does not work.</h3>
		<p>
In many cases, camera matrix setting and projection matrix setting are wrong.
		</p>

		<h3>The ribbon and the track become strange.</h3>
		<p>
In many cases, the maximum number of instances at initialization is too small.
		</p>

		<h3>Instances with textures are not drawn in OpenGL version.</h3>
		<p>
In the OpenGL version, the texture must have a mipmap. Please use "glGenerateMipmap" to generate it.
		</p>
	</div>
</body>

</html>